TEXT ·_hsum_float64(SB), $0-32

	MOVD input+0(FP),   R0
	MOVD result+8(FP),  R1
	MOVD size+16(FP),   R2

WORD $0xf900003f		// MOVD ZR, (R1)
WORD $0xd341fc43		// LSR $1, R2, R3
WORD $0x7100007f		// CMPW $0, R3
WORD $0x5400032d		// BLE 25(PC)
WORD $0x51000465		// SUBW $1, R3, R5
WORD $0x91004007		// ADD $16, R0, R7
WORD $0x2a0503e6		// MOVW R5, R6
WORD $0x2f00e400		// VMOVI $0, V0
WORD $0xaa0003e4		// MOVD R0, R4
WORD $0x8b2650e5		// ADD R6.UXTW<<4, R7, R5
WORD $0x3cc10481		// MOVD.P 16(R4), V1
WORD $0x7e70d821		// FADDP V1.D2, F1
WORD $0xeb0400bf		// CMP R4, R5
WORD $0x1e612800		// FADDD F1, F0, F0
WORD $0xfd000020		// FMOVD F0, (R1)
WORD $0x54ffff61		// BNE -5(PC)
WORD $0x531f7863		// LSLW $1, R3, R3
WORD $0x93407c63		// SXTW R3, R3
WORD $0xeb03005f		// CMP R3, R2
WORD $0x54000109		// BLS 8(PC)
WORD $0x8b030c03		// ADD R3<<3, R0, R3
WORD $0x8b020c00		// ADD R2<<3, R0, R0
WORD $0xfc408461		// FMOVD.P 8(R3), F1
WORD $0x1e612800		// FADDD F1, F0, F0
WORD $0xeb03001f		// CMP R3, R0
WORD $0xfd000020		// FMOVD F0, (R1)
WORD $0x54ffff81		// BNE -4(PC)
WORD $0xd65f03c0		// RET
WORD $0x2f00e400		// VMOVI $0, V0
WORD $0x17fffff3		// JMP -13(PC)

TEXT ·_hmax_float64(SB), $0-32

	MOVD input+0(FP),   R0
	MOVD result+8(FP),  R1
	MOVD size+16(FP),   R2

WORD $0xfd400001		// FMOVD (R0), F1
WORD $0xd341fc43		// LSR $1, R2, R3
WORD $0x7100007f		// CMPW $0, R3
WORD $0xfd000021		// FMOVD F1, (R1)
WORD $0x5400020d		// BLE 16(PC)
WORD $0x51000465		// SUBW $1, R3, R5
WORD $0x91004007		// ADD $16, R0, R7
WORD $0x2a0503e6		// MOVW R5, R6
WORD $0xaa0003e4		// MOVD R0, R4
WORD $0x8b2650e5		// ADD R6.UXTW<<4, R7, R5
WORD $0x3dc00080		// MOVD (R4), V0
WORD $0x91004084		// ADD $16, R4, R4
WORD $0xfd400021		// FMOVD (R1), F1
WORD $0x7e70f800		// FMAXP V0.D2, F0
WORD $0x1e602030		// FCMPED F0, F1
WORD $0x54000065		// BPL 3(PC)
WORD $0x1e604001		// FMOVD F0, F1
WORD $0xfd000020		// FMOVD F0, (R1)
WORD $0xeb05009f		// CMP R5, R4
WORD $0x54fffee1		// BNE -9(PC)
WORD $0x531f7863		// LSLW $1, R3, R3
WORD $0x93407c63		// SXTW R3, R3
WORD $0xeb03005f		// CMP R3, R2
WORD $0x54000169		// BLS 11(PC)
WORD $0x8b030c03		// ADD R3<<3, R0, R3
WORD $0x8b020c00		// ADD R2<<3, R0, R0
WORD $0xfd400060		// FMOVD (R3), F0
WORD $0x91002063		// ADD $8, R3, R3
WORD $0x1e612010		// FCMPED F1, F0
WORD $0x5400006d		// BLE 3(PC)
WORD $0x1e604001		// FMOVD F0, F1
WORD $0xfd000020		// FMOVD F0, (R1)
WORD $0xeb00007f		// CMP R0, R3
WORD $0x54ffff21		// BNE -7(PC)
WORD $0xd65f03c0		// RET

TEXT ·_hmin_float64(SB), $0-32

	MOVD input+0(FP),   R0
	MOVD result+8(FP),  R1
	MOVD size+16(FP),   R2

WORD $0xfd400001		// FMOVD (R0), F1
WORD $0xd341fc43		// LSR $1, R2, R3
WORD $0x7100007f		// CMPW $0, R3
WORD $0xfd000021		// FMOVD F1, (R1)
WORD $0x5400020d		// BLE 16(PC)
WORD $0x51000465		// SUBW $1, R3, R5
WORD $0x91004007		// ADD $16, R0, R7
WORD $0x2a0503e6		// MOVW R5, R6
WORD $0xaa0003e4		// MOVD R0, R4
WORD $0x8b2650e5		// ADD R6.UXTW<<4, R7, R5
WORD $0x3dc00080		// MOVD (R4), V0
WORD $0x91004084		// ADD $16, R4, R4
WORD $0xfd400021		// FMOVD (R1), F1
WORD $0x7ef0f800		// FMINP V0.D2, F0
WORD $0x1e602030		// FCMPED F0, F1
WORD $0x5400006d		// BLE 3(PC)
WORD $0x1e604001		// FMOVD F0, F1
WORD $0xfd000020		// FMOVD F0, (R1)
WORD $0xeb05009f		// CMP R5, R4
WORD $0x54fffee1		// BNE -9(PC)
WORD $0x531f7863		// LSLW $1, R3, R3
WORD $0x93407c63		// SXTW R3, R3
WORD $0xeb03005f		// CMP R3, R2
WORD $0x54000169		// BLS 11(PC)
WORD $0x8b030c03		// ADD R3<<3, R0, R3
WORD $0x8b020c00		// ADD R2<<3, R0, R0
WORD $0xfd400060		// FMOVD (R3), F0
WORD $0x91002063		// ADD $8, R3, R3
WORD $0x1e612010		// FCMPED F1, F0
WORD $0x54000065		// BPL 3(PC)
WORD $0x1e604001		// FMOVD F0, F1
WORD $0xfd000020		// FMOVD F0, (R1)
WORD $0xeb00007f		// CMP R0, R3
WORD $0x54ffff21		// BNE -7(PC)
WORD $0xd65f03c0		// RET
